//////////////////////////////////////////////////////////////////////////
// tetraelem - class to hold information about tetrahedral element
// By Antonio Miranda - October 2010
//////////////////////////////////////////////////////////////////////////

#ifndef _TETRA_ELEM_
#define _TETRA_ELEM_

class triface; 
//
//////////////////////////////////////////////////////////////////////////
class tetraelem
{
public:
  tetraelem(void);
  ~tetraelem(void);

  //
  int id;
  int vert[10];  // 4 corners and 6 mid-edge
  
  //
  char type;  // 0 - linear, 1 - quadratic
  
  triface *faces[4];

  int flag;

  // gauss integration and material information
  int gauss, mat;

  void getFaces (int id_faces[4][3])
  {
    id_faces[0][0] = vert[0];
    id_faces[0][1] = vert[1];
    id_faces[0][2] = vert[2];

    id_faces[1][0] = vert[1];
    id_faces[1][1] = vert[0];
    id_faces[1][2] = vert[3];

    id_faces[2][0] = vert[2];
    id_faces[2][1] = vert[1];
    id_faces[2][2] = vert[3];

    id_faces[3][0] = vert[0];
    id_faces[3][1] = vert[2];
    id_faces[3][2] = vert[3];
  }

};

#endif